GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

grid.js ➔ ???   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
c 0
b 0
f 0
nc 1
dl 0
loc 8
rs 9.4285
nop 2
1
import { generateLastUpdate } from './../../util/lastUpdate';
2
3
import { Grid } from './../../records';
4
5
import localStorageManager from './../../components/core/LocalStorageManager'; // eslint-disable-line
6
import getUpdatedRecord from './../../util/getUpdatedRecord';
7
8
const debouncedColumnSetter = localStorageManager.debouncedSetStateItem();
9
10
export const hideHeader = (state, { stateKey, headerHidden }) =>
11
    getUpdatedRecord(
12
        state, stateKey, {
13
            headerHidden: headerHidden,
14
            lastUpdate: generateLastUpdate()
15
        },
16
        Grid
17
    );
18
19
export const setColumns = (state, { columns, stateKey, stateful }) => {
20
    if (stateful) {
21
        setColumnsInStorage({
22
            stateKey: stateKey,
23
            columns: columns
24
        });
25
    }
26
27
    return getUpdatedRecord(state, stateKey, {
28
        columns: columns,
29
        lastUpdate: generateLastUpdate()
30
    }, Grid);
31
};
32
33
export const setSortDirection = (state, { stateKey, columns }) =>
34
    getUpdatedRecord(state, stateKey, {
35
        columns: columns,
36
        lastUpdate: generateLastUpdate()
37
    }, Grid);
38
39
export const resizeColumns = (state, { stateful, stateKey, columns }) => {
40
    if (stateful) {
41
        setColumnsInStorage({
42
            stateKey: stateKey,
43
            columns: columns
44
        });
45
    }
46
47
    return getUpdatedRecord(state, stateKey, {
48
        columns: columns,
49
        lastUpdate: generateLastUpdate()
50
    }, Grid);
51
};
52
53
export const setColumnsInStorage = ({ columns, stateKey }) => {
54
    debouncedColumnSetter({
55
        stateKey: stateKey,
56
        property: 'columns',
57
        value: columns
58
    });
59
};
60